<template>
    <div id="app">
        <transition>
            <router-view/>
        </transition>
    </div>
</template>

<script>
    import {Url} from "./utils/config";

    export default {
        name: 'app',
        mounted() {
            this.loadUser();
            this.loadStock();
        },
        methods: {
            loadUser() {
                this.$store.dispatch('loadProfile')
            },
            loadStock() {
                this.$get("/api/config").then((res) => {
                    console.log(res)
                    let stock = res.data.stock
                    let help = res.data.help
                    this.$store.commit("updateStockValue", {stock_value: stock,help:help})

                })
            }
        }

    }
</script>

<style>

</style>
